package com.lhd.charging.order.feign;

import com.lhd.charging.pojo.StationInfoVO;
import com.lhd.charging.pojo.param.GunStatusUpdateParam;
import com.lhd.charging.web.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("deviceService")
public interface DeviceClient {
    @GetMapping("/device/station/info/{gunId}")
    JsonResult<StationInfoVO> getDeviceInfo(@PathVariable("gunId") Integer gunId);

    /**
     *  /device/station/updateGunStatus
     *     设备    站     枪  动作
     *     CRUD  PUT GET  POST DELETE ==>
     *     R-GET CUD-POST
     *  GET  /device/station/gun/ 读
     *  PUT  /device/station/gun/ 创建
     *  POST /device/station/gun/ 更新
     *  DELETE /device/station/gun/ 删除
     *
     *  GET  /device/station/gun/ 读
     *  POST 表示三种动作
     *   /device/station/gun/create 创建
     *   /device/station/gun/update 更新
     *   /device/station/gun/del 删除
     *
     *   资源 /device/station/gun/status/   /动作 update
     *  /device/station/gun/status/update
     *   动作/资源
     *  /device/update/station/gun/status/
     */
    @PostMapping("/device/station/gun/status/update")
    JsonResult<Boolean> updateStationStatus(@RequestBody GunStatusUpdateParam param);
}
